const koa = require('koa');
const ejs = require('koa-ejs');
const path = require('path');

let server = new koa();
server.listen(8090);

ejs(server, {
  root: path.resolve(__dirname, 'template'),
  layout: false,
  viewExt: 'ejs',
  cache: false,
  debug: false
});

server.use(async ctx => {
  await ctx.render('2', {
    arr: [12, 4, 55, 6, 73]
  })
})